home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / packet / p_tapr / tnchst / mthost.c < prev    next >
Text File  |  1991-08-18  |  7KB  |  142 lines

  1. /*************************************************************
  2. *             TNC-2 HOST MODE TEST PROGRAM
  3. *
  4. *
  5. *    This code should be compiled with Microsoft C and
  6. *    further linked with MTHDRIVER.OBJ.
  7. *************************************************************/
  8.  
  9. /** develop list below from compiling w/ option /Zg */
  10. /*#if LINT_ARGS*/
  11.  
  12. /*global*/  int AUXRDY(void );
  13. /*global*/  void moncall(unsigned char *);
  14. /*global*/  void monframe(unsigned char *,int );
  15. /*global*/  int makupper(char *);
  16. /*global*/  int iswhite(char );
  17. /*global*/  unsigned char *atocall(unsigned char *,char *);
  18. /*global*/  char *calltoa(unsigned char *,char *);
  19. /*global*/  void cdecl aftr_init(void );
  20. /*global*/  int cdecl aftr_handler(struct itm_struct *);
  21. /*global*/  int aftr_proc(unsigned char );
  22. /*global*/  void aftt_send_bin(unsigned char );
  23. /*global*/  void aftt_send_data(unsigned char );
  24. /*global*/  int cdecl aftt_send(struct itm_struct *);
  25. /*global*/  void cdecl dlc_init(void );
  26. /*global*/  void cdecl dlc_timer_retry_reset(struct dlccb_struct *);
  27. /*global*/  void cdecl dlc_event(unsigned char ,struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
  28. /*global*/  void cdecl dlc_timer_tick(void );
  29. /*global*/  void cdecl dlc_data_init(struct dlccb_struct *);
  30. /*global*/  void cdecl send_dlc_fr(struct dlccb_struct *,unsigned char ,unsigned char *,unsigned int );
  31. /*global*/  void cdecl send_resetack(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
  32. /*global*/  void cdecl send_dlcdack(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
  33. /*global*/  void cdecl dlc_ring_in(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
  34. /*global*/  void cdecl dlc_ring_out(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
  35. /*global*/  void cdecl dlc_retryfail(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
  36. /*global*/  void cdecl dlc_retryreset(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
  37. /*global*/  void cdecl dlc_senddata(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
  38. /*global*/  void cdecl dlc_dataproc(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
  39. /*global*/  void cdecl dlc_ackproc(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
  40. /*global*/  void cdecl aft_in_handler(struct dlc_frame_struct *,unsigned int );
  41. /*global*/  void dlc_start_cmd(void );
  42. /*global*/  int cdecl dlc_data_cmd(unsigned char *,unsigned int );
  43. /*global*/  int dlc_data_handler(unsigned char *,unsigned int );
  44. /*global*/  void cdecl blp_init(void );
  45. /*global*/  void cdecl blp_timer_retry_reset(struct blpcb_struct *);
  46. /*global*/  void cdecl blp_event(unsigned char ,struct blpcb_struct *,struct bframe_struct *,unsigned int );
  47. /*global*/  void cdecl blp_timer_tick(void );
  48. /*global*/  void cdecl blp_data_init(struct blpcb_struct *);
  49. /*global*/  void cdecl send_blp_fr(struct blpcb_struct *,unsigned char ,unsigned char *,unsigned int );
  50. /*global*/  int cdecl send_blp_datagram(unsigned char ,unsigned char *,unsigned int );
  51. /*global*/  struct blpcb_struct *cdecl find_lcn(unsigned char );
  52. /*global*/  void cdecl send_cclrd(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  53. /*global*/  void cdecl send_dack(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  54. /*global*/  void cdecl send_dbusy(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  55. /*global*/  void cdecl send_cstrep(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  56. /*global*/  void cdecl send_cstenq(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  57. /*global*/  void cdecl ring_in(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  58. /*global*/  void cdecl collide(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  59. /*global*/  void cdecl answered(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  60. /*global*/  void cdecl caller_rdy(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  61. /*global*/  void cdecl clr_reply(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  62. /*global*/  void cdecl stopblp(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  63. /*global*/  void cdecl retryfail(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  64. /*global*/  void cdecl retrycs(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  65. /*global*/  void cdecl retrycc(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  66. /*global*/  void cdecl retrycclr(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  67. /*global*/  void cdecl senddata(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  68. /*global*/  void cdecl dataproc(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  69. /*global*/  void cdecl ackproc(struct blpcb_struct *,struct bframe_struct *,unsigned int );
  70. /*global*/  void cdecl dlc_in_handler(struct bframe_struct *,unsigned int );
  71. /*global*/  struct blpcb_struct *cdecl blp_start_cmd(unsigned char ,char *);
  72. /*global*/  int cdecl blp_data_cmd(struct blpcb_struct *,unsigned char *,unsigned int );
  73. /*global*/  void blp_stop_cmd(struct blpcb_struct *);
  74. /*global*/  void blp_status_cmd(struct blpcb_struct *);
  75. /*global*/  unsigned char cdecl blp_start_handler(struct blpcb_struct *);
  76. /*global*/  void cdecl blp_connected_handler(unsigned char );
  77. /*global*/  void cdecl blp_stop_handler(unsigned char );
  78. /*global*/  int blp_data_handler(unsigned char ,unsigned char *,unsigned int );
  79. /*global*/  long disk_free(void );
  80. /*global*/  void updonemsg(void );
  81. /*global*/  int donada(int );
  82. /*global*/  void print_help(void );
  83. /*global*/  void set_upfile(void );
  84. /*global*/  void set_dwnfile(void );
  85. /*global*/  void cdecl kbd_blp_call(void );
  86. /*global*/  void cdecl kbd_blp_data(void );
  87. /*global*/  void cdecl kbd_blp_datagram(void );
  88. /*global*/  void cdecl kbd_blp_stop(void );
  89. /*global*/  void cdecl kbd_send_cstenq(void );
  90. /*global*/  void cdecl set_dlc_addr(void);
  91. /*global*/  void cdecl cmdproc(int );
  92. /*global*/  void totnc_proc(void );
  93. /*global*/  void fmtnc_proc(void );
  94. /*global*/  int blp_tick_test(void );
  95. /*global*/  int main(int ,char * *);
  96.  
  97.  
  98. /*#endif*/ /* endif LINTARGS -- now removed */
  99.  
  100.  
  101.  
  102. #include "hostlit.inc"
  103.  
  104. #include <stdio.h>
  105. #include <stdlib.h>
  106. #include <v2tov3.h>
  107. #include <process.h>
  108. #include <dos.h>
  109. #include <conio.h>
  110. #include <signal.h>
  111. #include <time.h>
  112. #include <io.h>
  113. #include <memory.h>
  114. #include <ctype.h>
  115. #include <sys\timeb.h>
  116. #include <sys\types.h>
  117.  
  118. #include "mt.lit"
  119.  
  120.  
  121.  
  122. #define   ASMAUX   1
  123. #define   ADJASPECT 1         /* TRUE when we crunch pix by 25% */
  124.  
  125. #define COMPORT 0
  126.  
  127. #define GDEBUG   0
  128.  
  129.    extern int near cdecl AUXAVAIL(void);
  130.    extern int near cdecl GETAUX(void);
  131. /*   extern int near cdecl AUXRDY(void); */
  132.    extern void near cdecl PUTAUX( byte );
  133. int  AUXRDY() { return( TRUE ); }  /** FAKE OUT FOR HOST - NO FLW*/
  134.  
  135.  
  136. #include   "ax25.c"
  137.  
  138. #include   "aft.c"
  139. #include   "dlc.c"
  140. #include   "blp.c"
  141. #include   "mthcode.c"
  142.